package com.yn.courseselectionsystem.dao;

import com.yn.courseselectionsystem.pojo.Appointment;
import com.yn.courseselectionsystem.pojo.Course;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface AppointmentDao {
    //添加预约记录
    int addAppointment(Appointment appointment);

    //获取下一个  该选课的是谁（那个预约到了）
    Appointment nextTakeTheCourse(Course course);

    //按用户id和课程id查 （监测有没有预约）
    Appointment selAppointment(@Param("userId") Integer userId,@Param("courseId") Integer courseId);

    //修改预约记录（改为改预约以成功选课）
    int upAppointmentTTWin(Appointment appointment);
}
